<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>指令</title>
    <style>
      [v-cloak] {
        display: none;
      }
    </style>
  </head>
  <body>
    <div id="app">
      <!-- 1、v-html指令 -->
      <h1 v-html="url"></h1>

      <!-- 2、v-cloak指令 -->
      <h2 v-cloak>{{ message }}</h2>
    </div>

    <script src="./lib/vue_v2.6.14.js"></script>
    <script>
      const app = new Vue({
        el: '#app',
        data: {
          // 假设这是服务器返回的数据
          url: '<a href="http:www.baidu.com">百度一下</a>',
          message: '你好啊'
        }
      });
    </script>
  </body>
</html>
